package commands;

import controller.Controller;
import detector.CheckableWheel;

/**
 * Commande destinee a prevenir le controleur qu'il y a eu detection d'une manipulation de la molette.
 */
public class DetectorToControllerWheelChangedCommand implements Command {

	private CheckableWheel checkableWheel;
	private Controller controller;
	
	public DetectorToControllerWheelChangedCommand(CheckableWheel checkableWheel, Controller controller) {
		this.checkableWheel = checkableWheel;
		this.controller = controller;	
	}
	
	@Override
	public void execute() {
		controller.wheelPositionChanged(checkableWheel.getCurrentPosition());
	}

}
